#include <iostream> 
using namespace std;
class A 
{ 
public:
	virtual ~A() { cout << "destructor A" << endl; } 
}; 
class B:public A { 
	public: 
	virtual ~B() { cout << "destructor B" << endl; } 
}; 
int main() 
{ 
//	A * pa = new B;
//	delete pa; 
//	A * p1 = new A;
//	delete p1;
	B * p2 = new B;
	delete p2;
	return 0;
}
